canAcceptCommand()

Description Determines whether the command is appropriate for the current selection.
Note: Do not define canAcceptCommand() unless it returns FALSE in at least one case. If the function is not defined, the command is assumed to be appropriate; making this assumption saves time and improves performance.
Arguments None.
Returns TRUE if the command is allowed; FALSE if it is not, dimming the command in the menu.
Example The following instance of canAcceptCommand() makes the command available only when the selection is a table:
function canAcceptCommand(){
   var selArr=dreamweaver.getSelection();
   var selObj=dreamweaver.offsetsToNode(selArr[0],selArr[1]);
   return (selObj.nodeType == Node.ELEMENT_NODE && selObj.tagName=="TABLE");
}